/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import java.util.Iterator;
import java.util.List;
import persistence.rb_employees_persist;
import vo.rb_employee;
import java.lang.Object;
import persistence.rb_emp_ot_persist;
import persistence.rb_emp_sal_structure_persist;
import vo.rb_ot_str;

/**
 *
 * @author subin
 */
public class EmployeeController {
    
    public static EmployeeController getInstance() {
        
        return new EmployeeController();
    }
    
        public boolean insertMultipleOTS(List<rb_ot_str> list) {
            Iterator it = list.iterator();
            while(it.hasNext()) {
                
                rb_ot_str str = (rb_ot_str) it.next();
                rb_emp_ot_persist.getInstance().insert(str);
            }
            return true;
        }
     public boolean create(rb_employee employee){
        new rb_employees_persist().insertEmployee(employee);
        return true;
    }
    
    public rb_employee update(rb_employee employee){
        
        return null;
    }
       
    
    
    public List<rb_ot_str> getAllEmployeeTypeAndOT() {
        
        return rb_emp_ot_persist.getInstance().getAllOTAndType();
    }
    public List<String> getEmployeeType() {
        
        return rb_emp_ot_persist.getInstance().getDistictEmployeeTypes();
    }
    public List getAllEmpSalaryDetails() {
        
        return new rb_emp_sal_structure_persist().getAllEmployeeSAlary();
    }


    public String delete(rb_employee employee){
        
        return null;
    }
    public List fetchAll(){
        List list =  rb_employees_persist.getInstance().getForPopulatingEmployeeTable();
        return list;        

       
    }
    
     public rb_employee fetch(String employeeId){
        
        return null;
    }
    
   
}
